#ifndef __MCDRAWELLIPSECOMMAND_H_
#define __MCDRAWELLIPSECOMMAND_H_

#include "MCCommand.h"
#include "MCCommandManager.h"
#include "MCEllipseVisual.h"
#include "MCPoint2D.h"
#include <MCEllipseParametricWindow.h>

enum MCDrawEllipseStage
{
    SetCenter_,
    SetXRadius,
    SetYRadius,
    E_ParametricWindow
};

class MCDrawEllipseCommand : public MCCommand
{
public:

    MCDrawEllipseCommand(MCCommandManager *owner);
    ~MCDrawEllipseCommand();

    void onMouseDown(IMouseArgs &args) override;
    void onMouseUp(IMouseArgs &args) override;
    void onMouseMove(IMouseArgs &args) override;

    void terminate() override;

private:

    MCEllipseParametricWindow *_parametricWindow;
    MCDrawEllipseStage _currentStage;
    MCEllipseVisual *_ellipseVisual;
    MCPoint2D _settedCenter;
    double _settedRx;
    double _settedRy;

};

#endif
